package com.aspose.cells.a.d;

public class zfz {
   private long b;
   private long c;
   private long d;
   private double e;
   private double f;
   private int g;
   private int h;
   private int i;
   private int j;
   private int k;
   private int l;
   private int m;
   private int[] n;
   // $FF: synthetic field
   static final boolean a = !zfz.class.desiredAssertionStatus();

   public zfz(byte[] var1) throws Exception {
      this(new zu(new com.aspose.cells.b.a.d.zh(var1)));
   }

   public zfz(zu var1) throws Exception {
      this.g = 32767;
      this.h = 2;
      this.i = 1;
      this.j = 1;
      this.k = 1;
      this.l = 1;
      this.m = 4;
      this.n = new int[]{0};
      this.b = var1.a().i();
      this.a(var1);
   }

   private void a(zu var1) throws Exception {
      short var2 = var1.d();
      boolean var3 = var2 == 19789;
      int var4 = a(var1, var3);
      if ((var4 & '\uffff') == 42) {
         long var5 = b(var1, var3);
         var1.a().b(this.b + (var5 & 4294967295L));
         int var7 = a(var1, var3);
         long var8 = var1.a().i();

         for(int var10 = 0; var10 < (var7 & '\uffff'); ++var10) {
            var1.a().b(var8);
            var8 += 12L;
            int var11 = a(var1, var3);
            int var12 = a(var1, var3);
            long var13 = b(var1, var3);
            if (((var12 & '\uffff') == 1 || (var12 & '\uffff') == 2) && (var13 & 4294967295L) > 4L || (var12 & '\uffff') == 3 && (var13 & 4294967295L) > 2L || (var12 & '\uffff') == 4 && (var13 & 4294967295L) > 1L || (var12 & '\uffff') == 5) {
               long var15 = b(var1, var3);
               var1.a().b(this.b + (var15 & 4294967295L));
            }

            switch(var11) {
            case 256:
               this.c = (var12 & '\uffff') == 3 ? (long)a(var1, var3) : b(var1, var3);
               break;
            case 257:
               this.d = (var12 & '\uffff') == 3 ? (long)a(var1, var3) : b(var1, var3);
               break;
            case 258:
               this.n = a(var1, var3, var13);
               break;
            case 259:
               this.i = a(var1, var3) & '\uffff';
               break;
            case 262:
               this.g = a(var1, var3) & '\uffff';
               break;
            case 277:
               this.l = a(var1, var3);
               break;
            case 282:
               this.e = c(var1, var3);
               break;
            case 283:
               this.f = c(var1, var3);
               break;
            case 284:
               this.j = a(var1, var3) & '\uffff';
               break;
            case 296:
               this.h = a(var1, var3) & '\uffff';
               break;
            case 332:
               this.k = a(var1, var3) & '\uffff';
               break;
            case 334:
               this.m = a(var1, var3);
            }
         }

      }
   }

   private static int a(zu var0, boolean var1) throws Exception {
      int var2 = var0.e();
      if (!var1) {
         var2 = zw.a(var2);
      }

      return var2;
   }

   private static long b(zu var0, boolean var1) throws Exception {
      long var2 = var0.c();
      if (!var1) {
         var2 = zw.a(var2);
      }

      return var2;
   }

   private static int[] a(zu var0, boolean var1, long var2) throws Exception {
      int[] var4 = new int[(int)(var2 & 4294967295L)];

      for(int var5 = 0; var5 < var4.length; ++var5) {
         var4[var5] = a(var0, var1);
      }

      return var4;
   }

   private static double c(zu var0, boolean var1) throws Exception {
      long var2 = b(var0, var1);
      long var4 = b(var0, var1);
      return (var4 & 4294967295L) != 0L ? (double)((var2 & 4294967295L) / (var4 & 4294967295L)) : 0.0D;
   }

   public boolean a() {
      if (this.h != 1 && this.h != 2 && this.h != 3) {
         return false;
      } else {
         return this.b() || this.c() || this.d() || this.e() || this.f();
      }
   }

   private boolean b() {
      return (this.g == 0 || this.g == 1) && (this.n[0] & '\uffff') == 0 && (this.i == 1 || this.i == 2 || this.i == 3 || this.i == 4 || this.i == 5 || this.i == 32773);
   }

   private boolean c() {
      return (this.g == 0 || this.g == 1) && ((this.n[0] & '\uffff') == 4 || (this.n[0] & '\uffff') == 8 || (this.n[0] & '\uffff') == 16) && (this.i == 1 || this.i == 2 || this.i == 32773);
   }

   private boolean d() {
      return this.g == 3 && ((this.n[0] & '\uffff') == 1 || (this.n[0] & '\uffff') == 4 || (this.n[0] & '\uffff') == 8) && (this.i == 1 || this.i == 5 || this.i == 32773);
   }

   private boolean e() {
      return this.g == 2 && this.j == 1 && this.n.length == (this.l & '\uffff') && this.g() && (this.i == 1 || this.i == 5 || this.i == 6 || this.i == 32773);
   }

   private boolean f() {
      return this.g == 5 && this.j == 1 && this.k == 1 && this.m == 4 && this.n.length == (this.l & '\uffff') && this.g() && (this.i == 1 || this.i == 5 || this.i == 6 || this.i == 32773);
   }

   private boolean g() {
      boolean var1 = (this.n[0] & '\uffff') == 8 || (this.n[0] & '\uffff') == 16;

      for(int var2 = 0; var2 < this.n.length; ++var2) {
         var1 = var1 && this.n[var2] == this.n[0];
      }

      return var1;
   }
}
